
// Josh made this.
#include "Boulder.h"
#include "WindowManager.h"
#include "SFML\System.hpp"
#include <iostream>
using namespace std;

sf::Texture *BoulderObject::boulderTex;
sf::Texture *boulderTexture = NULL;

void BoulderObject::Render() // Need to state with class type we are using, i.e. TestObject::
{
	WindowMan::GetWindow()->draw(boulderSprite);
}

void BoulderObject::Update() // Need to state with class type we are using, i.e. TestObject::
{
	sf::Clock moveSpeed;

	boulderSprite.setScale(0.2f, 0.2f);
	boulderSprite.move(-backgroundSpeed, 0.0f);

	Object::r.top = boulderSprite.getPosition().y + 10;
	Object::r.left = boulderSprite.getPosition().x + 10;
	Object::r.height = 40.0f;
	Object::r.width = 20.0f;

	if (boulderSprite.getPosition().x < -50)
	{
		Factory::DeleteObject(this);
	}
}